Skip to content

Fix: M1 history pagination review feedback#9246

Merged
ashleeradka merged 1 commit into
mainfrom
swarm/history-pagination/fix-m1
Feb 25, 2026
Merged

Fix: M1 history pagination review feedback#9246
ashleeradka merged 1 commit into
mainfrom
swarm/history-pagination/fix-m1

Conversation

@ashleeradka

@ashleeradka ashleeradka commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Addresses review feedback on #9227. Two issues fixed:

  1. Default limit is now unlimited — When callers don't specify a limit, all messages are returned (original behavior preserved). Previously, the default of 50 silently truncated history for existing callers that don't pass pagination params.

  2. Compound cursor for stable pagination — Added beforeMessageId as a tie-breaker alongside beforeTimestamp. When both are provided, the query uses lte + ne to include same-millisecond messages while excluding the boundary message already seen. Legacy callers without beforeMessageId fall back to strict lt (unchanged behavior).

Implementation

  • getMessagesPaginated() now accepts limit: number | undefined — when undefined, returns all messages with hasMore: false
  • New beforeMessageId parameter enables compound cursor: lte(createdAt, timestamp) AND ne(id, messageId)
  • HistoryResponse now includes oldestMessageId alongside oldestTimestamp for clients to use as the compound cursor
  • IPC contract updated with new optional fields; generated Swift types regenerated

Files Changed

  • assistant/src/daemon/ipc-contract/sessions.ts — Added beforeMessageId to request, oldestMessageId to response
  • assistant/src/memory/conversation-store.ts — Unlimited support + compound cursor query
  • assistant/src/daemon/handlers/sessions.ts — Pass through new fields, default limit to undefined
  • clients/shared/IPC/Generated/IPCContractGenerated.swift — Regenerated from contract

Open with Devin

…bility

Co-Authored-By: Claude <noreply@anthropic.com>
@ashleeradka ashleeradka self-assigned this Feb 25, 2026
@ashleeradka ashleeradka merged commit 75178bd into main Feb 25, 2026
2 of 3 checks passed
@ashleeradka ashleeradka deleted the swarm/history-pagination/fix-m1 branch February 25, 2026 23:43

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

Comment thread assistant/src/memory/conversation-store.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 37f81475f1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread assistant/src/memory/conversation-store.ts
@ashleeradka

Copy link
Copy Markdown
Contributor Author

Addressed in #9326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant